package kind;

class Dog {
    private String name;
    private int age;
    private String color;


    public Dog(String name, int age, String color) {

        this.name = name;
        this.age = age;

        this.color = color;




    }


    public String getName() {
        return name;
    }


    public int getAge() {
        return age;
    }


    public String getColor() {
        return color;
    }


    public void makeSound() {
        System.out.println("汪汪汪");
    }
}

class Cat {
    private String name;
    private int age;
    private String color;


    public Cat(String name, int age, String color) {
        this.name = name;
        this.age = age;
        this.color = color;
    }


    public String getName() {
        return name;
    }


    public int getAge() {
        return age;
    }


    public String getColor() {
        return color;
    }


    public void makeSound() {
        System.out.println("喵喵喵");
    }
}

public class Ddd {
    public static void main(String[] args) {

        Dog dog = new Dog("布鲁斯", 3, "黄色");
        System.out.println("狗的名字是" + dog.getName() + "，年龄是" + dog.getAge() + "，毛色是" + dog.getColor());
        dog.makeSound();


        Cat cat = new Cat("咪咪", 2, "白色");
        System.out.println("猫的名字是" + cat.getName() + "，年龄是" + cat.getAge() + "，毛色是" + cat.getColor());
        cat.makeSound();
    }
}